From 4057f438fdceb1a2f6a632ff1925e294da0a5078 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 20 May 2016 16:54:01 +0300 Subject: [PATCH] fix test_cargo_freshness --- tests/test_cargo_freshness.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_cargo_freshness.rs b/tests/test_cargo_freshness.rs index 7e57a3f8a..5a74a9b71 100644 --- a/tests/test_cargo_freshness.rs +++ b/tests/test_cargo_freshness.rs @@ -31,7 +31,7 @@ test!(modifying_and_moving { p.root().join("target").move_into_the_past().unwrap(); File::create(&p.root().join("src/a.rs")).unwrap() - .write_all(b"fn main() {}").unwrap(); + .write_all(b"#[allow(unused)]fn main() {}").unwrap(); assert_that(p.cargo("build"), execs().with_status(0).with_stderr(format!("\ [COMPILING] foo v0.0.1 ({dir}) @@ -73,12 +73,11 @@ test!(modify_only_some_files { let bin = p.root().join("src/b.rs"); File::create(&lib).unwrap().write_all(b"invalid rust code").unwrap(); - File::create(&bin).unwrap().write_all(b"fn foo() {}").unwrap(); + File::create(&bin).unwrap().write_all(b"#[allow(unused)]fn foo() {}").unwrap(); lib.move_into_the_past().unwrap(); // Make sure the binary is rebuilt, not the lib - assert_that(p.cargo("build") - .env("RUST_LOG", "cargo::ops::cargo_rustc::fingerprint"), + assert_that(p.cargo("build"), execs().with_status(0).with_stderr(format!("\ [COMPILING] foo v0.0.1 ({dir}) ", dir = path2url(p.root())))); -- 2.30.2